﻿
/*
 * PsTFS is a set of PowerShell commands to manage and use Team Foundation Server. PowerShell 
 * effectiveness is combined with the power of TFS API to maximizes TFS capabilities.
 * 
 * Creator : Choulant Noham
 * Mail : choulant@gmail.com
 * Blog : http://choulant.blogspot.com
 * 
 */


using System;
using System.Management.Automation;
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.VersionControl.Client;
using Microsoft.TeamFoundation.VersionControl.Common;
using PsTFS.Provider;
using PsTFS.Objects;


namespace PsTFS.Commandes.Remove
{
    /// <summary>
    /// Ajout d'un ou plusieurs fichiers
    /// </summary>
    [Cmdlet(VerbsCommon.Clear, "Context")]
    public class Clear_Context : Cmdlet
    {
        /// <summary>
        /// Lancement du processus de nettoyage
        /// </summary>
        protected override void ProcessRecord()
        {
            Context.GetContext().ClearContext();
            Console.WriteLine("Clear Context is success!");
            base.ProcessRecord();
        }

        /// <summary>
        /// Permet d'informer la fin de la commande
        /// </summary>
        protected override void EndProcessing()
        {
            Log.AddLog(null, "Remove-Context is end");
            base.EndProcessing();
        }
    }
}


